package com.aps.algorithm.utils.output;


import com.aps.algorithm.heuristic.genetic.dto.ApsOperationDto;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.stream.Collectors;

@Slf4j
public class OutputUtils {

    private static final Logger logger = LoggerFactory.getLogger(OutputUtils.class);

    public static void output(List<ApsOperationDto> sequence, String message) {
        logger.debug("{}：{}", message, sequence.stream()
                .map(op -> op.getOrderProcess().getOrderId() + "-" + op.getOrderProcess().getProcessName() + "(" + op.getOrderProcess().getSequence() + ")")
                .collect(Collectors.joining(" -> ")));
    }
}
